From: Florian Müllner Date: Wed, 20 Mar 2019 12:48:21 +0000 (+0000) Subject: aggregateMenu: Include action buttons in width computation again X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~871^2^2~27 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0089143d0628e681b9ccd24753efef28d9d7811e;p=gnome-shell.git aggregateMenu: Include action buttons in width computation again Commit 1b169655ac removed the system indicator from the list of children that are considered for the overall menu width, because we do want the log-out submenu to adapt to the available width. However as a side effect, action buttons no longer contribute to the width either, so if extensions add additional buttons, the menu is likely to overflow. Avoid this by only adding the button group to the list of size children. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1094 --- diff --git a/js/ui/panel.js b/js/ui/panel.js index 1d9621ae3..0f052d3e8 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -809,6 +809,7 @@ class AggregateMenu extends PanelMenu.Button { menuLayout.addSizeChild(this._location.menu.actor); menuLayout.addSizeChild(this._rfkill.menu.actor); menuLayout.addSizeChild(this._power.menu.actor); + menuLayout.addSizeChild(this._system.buttonGroup); } }); diff --git a/js/ui/status/system.js b/js/ui/status/system.js index 701d9db33..1b0d10d8c 100644 --- a/js/ui/status/system.js +++ b/js/ui/status/system.js @@ -236,6 +236,7 @@ var Indicator = class extends PanelMenu.SystemIndicator { item = new PopupMenu.PopupBaseMenuItem({ reactive: false, can_focus: false }); + this.buttonGroup = item.actor; let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app( 'gnome-control-center.desktop'